<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>ExoMediaDrm (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="ExoMediaDrm (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.drm</a></div>
<h2 title="Interface ExoMediaDrm" class="title">Interface ExoMediaDrm</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="DummyExoMediaDrm.html" title="class in com.google.android.exoplayer2.drm">DummyExoMediaDrm</a></code>, <code><a href="../testutil/FakeExoMediaDrm.html" title="class in com.google.android.exoplayer2.testutil">FakeExoMediaDrm</a></code>, <code><a href="FrameworkMediaDrm.html" title="class in com.google.android.exoplayer2.drm">FrameworkMediaDrm</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">ExoMediaDrm</span></pre>
<div class="block">Used to obtain keys for decrypting protected media streams.

 <h3>Reference counting</h3>

 <p>Access to an instance is managed by reference counting, where <a href="#acquire()"><code>acquire()</code></a> increments
 the reference count and <a href="#release()"><code>release()</code></a> decrements it. When the reference count drops to 0
 underlying resources are released, and the instance cannot be re-used.

 <p>Each new instance has an initial reference count of 1. Hence application code that creates a
 new instance does not normally need to call <a href="#acquire()"><code>acquire()</code></a>, and must call <a href="#release()"><code>release()</code></a>
 when the instance is no longer required.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/media/MediaDrm.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.AppManagedProvider.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.AppManagedProvider</a></span></code></th>
<td class="colLast">
<div class="block">Provides an <a href="ExoMediaDrm.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaDrm</code></a> instance owned by the app.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.KeyRequest.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.KeyRequest</a></span></code></th>
<td class="colLast">
<div class="block">Contains data used to request keys from a license server.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.KeyStatus.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.KeyStatus</a></span></code></th>
<td class="colLast">
<div class="block">Defines the status of a key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.OnEventListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnEventListener</a></span></code></th>
<td class="colLast">
<div class="block">Called when a DRM event occurs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.OnExpirationUpdateListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnExpirationUpdateListener</a></span></code></th>
<td class="colLast">
<div class="block">Called when a session expiration update occurs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.OnKeyStatusChangeListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnKeyStatusChangeListener</a></span></code></th>
<td class="colLast">
<div class="block">Called when the keys in a DRM session change state.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.Provider.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.Provider</a></span></code></th>
<td class="colLast">
<div class="block">Provider for <a href="ExoMediaDrm.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaDrm</code></a> instances.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoMediaDrm.ProvisionRequest.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.ProvisionRequest</a></span></code></th>
<td class="colLast">
<div class="block">Contains data to request a certificate from a provisioning server.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EVENT_KEY_EXPIRED">EVENT_KEY_EXPIRED</a></span></code></th>
<td class="colLast">
<div class="block">Event indicating that keys have expired, and are no longer usable.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EVENT_KEY_REQUIRED">EVENT_KEY_REQUIRED</a></span></code></th>
<td class="colLast">
<div class="block">Event indicating that keys need to be requested from the license server.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EVENT_PROVISION_REQUIRED">EVENT_PROVISION_REQUIRED</a></span></code></th>
<td class="colLast">
<div class="block">Event indicating that a certificate needs to be requested from the provisioning server.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#KEY_TYPE_OFFLINE">KEY_TYPE_OFFLINE</a></span></code></th>
<td class="colLast">
<div class="block">Key request type for keys that will be used for offline use.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#KEY_TYPE_RELEASE">KEY_TYPE_RELEASE</a></span></code></th>
<td class="colLast">
<div class="block">Key request type indicating that saved offline keys should be released.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#KEY_TYPE_STREAMING">KEY_TYPE_STREAMING</a></span></code></th>
<td class="colLast">
<div class="block">Key request type for keys that will be used for online use.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#acquire()">acquire</a></span>()</code></th>
<td class="colLast">
<div class="block">Increments the reference count.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#closeSession(byte%5B%5D)">closeSession</a></span>&#8203;(byte[]&nbsp;sessionId)</code></th>
<td class="colLast">
<div class="block">Closes a DRM session.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaCrypto</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createMediaCrypto(byte%5B%5D)">createMediaCrypto</a></span>&#8203;(byte[]&nbsp;sessionId)</code></th>
<td class="colLast">
<div class="block">Creates an <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> for a given session.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm" target="_top">ExoMediaCrypto</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExoMediaCryptoType()">getExoMediaCryptoType</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> type created by <a href="#createMediaCrypto(byte%5B%5D)"><code>createMediaCrypto(byte[])</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="ExoMediaDrm.KeyRequest.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.KeyRequest</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getKeyRequest(byte%5B%5D,java.util.List,int,java.util.HashMap)">getKeyRequest</a></span>&#8203;(byte[]&nbsp;scope,
             <a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="DrmInitData.SchemeData.html" title="class in com.google.android.exoplayer2.drm" target="_top">DrmInitData.SchemeData</a>&gt;&nbsp;schemeDatas,
             int&nbsp;keyType,
             <a href="https://developer.android.com/reference/java/util/HashMap.html" title="class or interface in java.util" class="externalLink">HashMap</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;optionalParameters)</code></th>
<td class="colLast">
<div class="block">Generates a key request.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/android/os/PersistableBundle.html" title="class or interface in android.os" class="externalLink" target="_top">PersistableBundle</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMetrics()">getMetrics</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns metrics data for this ExoMediaDrm instance, or <code>null</code> if metrics are unavailable.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPropertyByteArray(java.lang.String)">getPropertyByteArray</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName)</code></th>
<td class="colLast">
<div class="block">Returns the value of a byte array property.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPropertyString(java.lang.String)">getPropertyString</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName)</code></th>
<td class="colLast">
<div class="block">Returns the value of a string property.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="ExoMediaDrm.ProvisionRequest.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.ProvisionRequest</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProvisionRequest()">getProvisionRequest</a></span>()</code></th>
<td class="colLast">
<div class="block">Generates a provisioning request.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#openSession()">openSession</a></span>()</code></th>
<td class="colLast">
<div class="block">Opens a new DRM session.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#provideKeyResponse(byte%5B%5D,byte%5B%5D)">provideKeyResponse</a></span>&#8203;(byte[]&nbsp;scope,
                  byte[]&nbsp;response)</code></th>
<td class="colLast">
<div class="block">Provides a key response for the last request to be generated using <a href="#getKeyRequest(byte%5B%5D,java.util.List,int,java.util.HashMap)"><code>getKeyRequest(byte[], java.util.List&lt;com.google.android.exoplayer2.drm.DrmInitData.SchemeData&gt;, int, java.util.HashMap&lt;java.lang.String, java.lang.String&gt;)</code></a>.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#provideProvisionResponse(byte%5B%5D)">provideProvisionResponse</a></span>&#8203;(byte[]&nbsp;response)</code></th>
<td class="colLast">
<div class="block">Provides a provisioning response for the last request to be generated using <a href="#getProvisionRequest()"><code>getProvisionRequest()</code></a>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#queryKeyStatus(byte%5B%5D)">queryKeyStatus</a></span>&#8203;(byte[]&nbsp;sessionId)</code></th>
<td class="colLast">
<div class="block">Returns the key status for a given session, as {name, value} pairs.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release()">release</a></span>()</code></th>
<td class="colLast">
<div class="block">Decrements the reference count.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#restoreKeys(byte%5B%5D,byte%5B%5D)">restoreKeys</a></span>&#8203;(byte[]&nbsp;sessionId,
           byte[]&nbsp;keySetId)</code></th>
<td class="colLast">
<div class="block">Restores persisted offline keys into a session.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOnEventListener(com.google.android.exoplayer2.drm.ExoMediaDrm.OnEventListener)">setOnEventListener</a></span>&#8203;(<a href="ExoMediaDrm.OnEventListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnEventListener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Sets the listener for DRM events.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOnExpirationUpdateListener(com.google.android.exoplayer2.drm.ExoMediaDrm.OnExpirationUpdateListener)">setOnExpirationUpdateListener</a></span>&#8203;(<a href="ExoMediaDrm.OnExpirationUpdateListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnExpirationUpdateListener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Sets the listener for session expiration events.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOnKeyStatusChangeListener(com.google.android.exoplayer2.drm.ExoMediaDrm.OnKeyStatusChangeListener)">setOnKeyStatusChangeListener</a></span>&#8203;(<a href="ExoMediaDrm.OnKeyStatusChangeListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnKeyStatusChangeListener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Sets the listener for key status change events.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPropertyByteArray(java.lang.String,byte%5B%5D)">setPropertyByteArray</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName,
                    byte[]&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the value of a byte array property.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPropertyString(java.lang.String,java.lang.String)">setPropertyString</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName,
                 <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the value of a string property.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="EVENT_KEY_REQUIRED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EVENT_KEY_REQUIRED</h4>
<pre>static final&nbsp;int EVENT_KEY_REQUIRED</pre>
<div class="block">Event indicating that keys need to be requested from the license server.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.drm.ExoMediaDrm.EVENT_KEY_REQUIRED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="EVENT_KEY_EXPIRED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EVENT_KEY_EXPIRED</h4>
<pre>static final&nbsp;int EVENT_KEY_EXPIRED</pre>
<div class="block">Event indicating that keys have expired, and are no longer usable.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.drm.ExoMediaDrm.EVENT_KEY_EXPIRED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="EVENT_PROVISION_REQUIRED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EVENT_PROVISION_REQUIRED</h4>
<pre>static final&nbsp;int EVENT_PROVISION_REQUIRED</pre>
<div class="block">Event indicating that a certificate needs to be requested from the provisioning server.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.drm.ExoMediaDrm.EVENT_PROVISION_REQUIRED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="KEY_TYPE_STREAMING">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_TYPE_STREAMING</h4>
<pre>static final&nbsp;int KEY_TYPE_STREAMING</pre>
<div class="block">Key request type for keys that will be used for online use. Streaming keys will not be saved to
 the device for subsequent use when the device is not connected to a network.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.drm.ExoMediaDrm.KEY_TYPE_STREAMING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="KEY_TYPE_OFFLINE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_TYPE_OFFLINE</h4>
<pre>static final&nbsp;int KEY_TYPE_OFFLINE</pre>
<div class="block">Key request type for keys that will be used for offline use. They will be saved to the device
 for subsequent use when the device is not connected to a network.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.drm.ExoMediaDrm.KEY_TYPE_OFFLINE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="KEY_TYPE_RELEASE">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>KEY_TYPE_RELEASE</h4>
<pre>static final&nbsp;int KEY_TYPE_RELEASE</pre>
<div class="block">Key request type indicating that saved offline keys should be released.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.drm.ExoMediaDrm.KEY_TYPE_RELEASE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="setOnEventListener(com.google.android.exoplayer2.drm.ExoMediaDrm.OnEventListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnEventListener</h4>
<pre class="methodSignature">void&nbsp;setOnEventListener&#8203;(@Nullable
                        <a href="ExoMediaDrm.OnEventListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnEventListener</a>&nbsp;listener)</pre>
<div class="block">Sets the listener for DRM events.

 <p>This is an optional method, and some implementations may only support it on certain Android
 API levels.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - The listener to receive events, or <code>null</code> to stop receiving events.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="externalLink" target="_top">UnsupportedOperationException</a></code> - if the implementation doesn't support this method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/media/MediaDrm.html#setOnEventListener(android.media.MediaDrm.OnEventListener)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm.setOnEventListener(MediaDrm.OnEventListener)</code></a></dd>
</dl>
</li>
</ul>
<a id="setOnKeyStatusChangeListener(com.google.android.exoplayer2.drm.ExoMediaDrm.OnKeyStatusChangeListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnKeyStatusChangeListener</h4>
<pre class="methodSignature">void&nbsp;setOnKeyStatusChangeListener&#8203;(@Nullable
                                  <a href="ExoMediaDrm.OnKeyStatusChangeListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnKeyStatusChangeListener</a>&nbsp;listener)</pre>
<div class="block">Sets the listener for key status change events.

 <p>This is an optional method, and some implementations may only support it on certain Android
 API levels.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - The listener to receive events, or <code>null</code> to stop receiving events.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="externalLink" target="_top">UnsupportedOperationException</a></code> - if the implementation doesn't support this method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/media/MediaDrm.html#setOnKeyStatusChangeListener(android.media.MediaDrm.OnKeyStatusChangeListener,android.os.Handler)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm.setOnKeyStatusChangeListener(MediaDrm.OnKeyStatusChangeListener, Handler)</code></a></dd>
</dl>
</li>
</ul>
<a id="setOnExpirationUpdateListener(com.google.android.exoplayer2.drm.ExoMediaDrm.OnExpirationUpdateListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnExpirationUpdateListener</h4>
<pre class="methodSignature">void&nbsp;setOnExpirationUpdateListener&#8203;(@Nullable
                                   <a href="ExoMediaDrm.OnExpirationUpdateListener.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaDrm.OnExpirationUpdateListener</a>&nbsp;listener)</pre>
<div class="block">Sets the listener for session expiration events.

 <p>This is an optional method, and some implementations may only support it on certain Android
 API levels.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - The listener to receive events, or <code>null</code> to stop receiving events.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="externalLink" target="_top">UnsupportedOperationException</a></code> - if the implementation doesn't support this method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/media/MediaDrm.html#setOnExpirationUpdateListener(android.media.MediaDrm.OnExpirationUpdateListener,android.os.Handler)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm.setOnExpirationUpdateListener(MediaDrm.OnExpirationUpdateListener, Handler)</code></a></dd>
</dl>
</li>
</ul>
<a id="openSession()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>openSession</h4>
<pre class="methodSignature">byte[]&nbsp;openSession()
            throws <a href="https://developer.android.com/reference/android/media/MediaDrmException.html" title="class or interface in android.media" class="externalLink" target="_top">MediaDrmException</a></pre>
<div class="block">Opens a new DRM session. A session ID is returned.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The session ID.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/media/NotProvisionedException.html" title="class or interface in android.media" class="externalLink" target="_top">NotProvisionedException</a></code> - If provisioning is needed.</dd>
<dd><code><a href="https://developer.android.com/reference/android/media/ResourceBusyException.html" title="class or interface in android.media" class="externalLink" target="_top">ResourceBusyException</a></code> - If required resources are in use.</dd>
<dd><code><a href="https://developer.android.com/reference/android/media/MediaDrmException.html" title="class or interface in android.media" class="externalLink" target="_top">MediaDrmException</a></code> - If the session could not be opened.</dd>
</dl>
</li>
</ul>
<a id="closeSession(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeSession</h4>
<pre class="methodSignature">void&nbsp;closeSession&#8203;(byte[]&nbsp;sessionId)</pre>
<div class="block">Closes a DRM session.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sessionId</code> - The ID of the session to close.</dd>
</dl>
</li>
</ul>
<a id="getKeyRequest(byte[],java.util.List,int,java.util.HashMap)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKeyRequest</h4>
<pre class="methodSignature"><a href="ExoMediaDrm.KeyRequest.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.KeyRequest</a>&nbsp;getKeyRequest&#8203;(byte[]&nbsp;scope,
                                     @Nullable
                                     <a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="DrmInitData.SchemeData.html" title="class in com.google.android.exoplayer2.drm" target="_top">DrmInitData.SchemeData</a>&gt;&nbsp;schemeDatas,
                                     int&nbsp;keyType,
                                     @Nullable
                                     <a href="https://developer.android.com/reference/java/util/HashMap.html" title="class or interface in java.util" class="externalLink">HashMap</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;optionalParameters)
                              throws <a href="https://developer.android.com/reference/android/media/NotProvisionedException.html" title="class or interface in android.media" class="externalLink" target="_top">NotProvisionedException</a></pre>
<div class="block">Generates a key request.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - If <code>keyType</code> is <a href="#KEY_TYPE_STREAMING"><code>KEY_TYPE_STREAMING</code></a> or <a href="#KEY_TYPE_OFFLINE"><code>KEY_TYPE_OFFLINE</code></a>,
     the ID of the session that the keys will be provided to. If <code>keyType</code> is <a href="#KEY_TYPE_RELEASE"><code>KEY_TYPE_RELEASE</code></a>, the <code>keySetId</code> of the keys to release.</dd>
<dd><code>schemeDatas</code> - If key type is <a href="#KEY_TYPE_STREAMING"><code>KEY_TYPE_STREAMING</code></a> or <a href="#KEY_TYPE_OFFLINE"><code>KEY_TYPE_OFFLINE</code></a>, a
     list of <a href="DrmInitData.SchemeData.html" title="class in com.google.android.exoplayer2.drm"><code>DrmInitData.SchemeData</code></a> instances extracted from the media. Null otherwise.</dd>
<dd><code>keyType</code> - The type of the request. Either <a href="#KEY_TYPE_STREAMING"><code>KEY_TYPE_STREAMING</code></a> to acquire keys for
     streaming, <a href="#KEY_TYPE_OFFLINE"><code>KEY_TYPE_OFFLINE</code></a> to acquire keys for offline usage, or <a href="#KEY_TYPE_RELEASE"><code>KEY_TYPE_RELEASE</code></a> to release acquired keys. Releasing keys invalidates them for all
     sessions.</dd>
<dd><code>optionalParameters</code> - Are included in the key request message to allow a client application
     to provide additional message parameters to the server. This may be <code>null</code> if no
     additional parameters are to be sent.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The generated key request.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/media/NotProvisionedException.html" title="class or interface in android.media" class="externalLink" target="_top">NotProvisionedException</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/media/MediaDrm.html#getKeyRequest(byte%5B%5D,byte%5B%5D,java.lang.String,int,java.util.HashMap)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm.getKeyRequest(byte[], byte[], String, int, HashMap)</code></a></dd>
</dl>
</li>
</ul>
<a id="provideKeyResponse(byte[],byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>provideKeyResponse</h4>
<pre class="methodSignature">@Nullable
byte[]&nbsp;provideKeyResponse&#8203;(byte[]&nbsp;scope,
                          byte[]&nbsp;response)
                   throws <a href="https://developer.android.com/reference/android/media/NotProvisionedException.html" title="class or interface in android.media" class="externalLink" target="_top">NotProvisionedException</a>,
                          <a href="https://developer.android.com/reference/android/media/DeniedByServerException.html" title="class or interface in android.media" class="externalLink" target="_top">DeniedByServerException</a></pre>
<div class="block">Provides a key response for the last request to be generated using <a href="#getKeyRequest(byte%5B%5D,java.util.List,int,java.util.HashMap)"><code>getKeyRequest(byte[], java.util.List&lt;com.google.android.exoplayer2.drm.DrmInitData.SchemeData&gt;, int, java.util.HashMap&lt;java.lang.String, java.lang.String&gt;)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scope</code> - If the request had type <a href="#KEY_TYPE_STREAMING"><code>KEY_TYPE_STREAMING</code></a> or <a href="#KEY_TYPE_OFFLINE"><code>KEY_TYPE_OFFLINE</code></a>,
     the ID of the session to provide the keys to. If <code>keyType</code> is <a href="#KEY_TYPE_RELEASE"><code>KEY_TYPE_RELEASE</code></a>, the <code>keySetId</code> of the keys being released.</dd>
<dd><code>response</code> - The response data from the server.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If the request had type <a href="#KEY_TYPE_OFFLINE"><code>KEY_TYPE_OFFLINE</code></a>, the <code>keySetId</code> for the offline
     keys. An empty byte array or <code>null</code> may be returned for other cases.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/media/NotProvisionedException.html" title="class or interface in android.media" class="externalLink" target="_top">NotProvisionedException</a></code> - If the response indicates that provisioning is needed.</dd>
<dd><code><a href="https://developer.android.com/reference/android/media/DeniedByServerException.html" title="class or interface in android.media" class="externalLink" target="_top">DeniedByServerException</a></code> - If the response indicates that the server rejected the request.</dd>
</dl>
</li>
</ul>
<a id="getProvisionRequest()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProvisionRequest</h4>
<pre class="methodSignature"><a href="ExoMediaDrm.ProvisionRequest.html" title="class in com.google.android.exoplayer2.drm">ExoMediaDrm.ProvisionRequest</a>&nbsp;getProvisionRequest()</pre>
<div class="block">Generates a provisioning request.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The generated provisioning request.</dd>
</dl>
</li>
</ul>
<a id="provideProvisionResponse(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>provideProvisionResponse</h4>
<pre class="methodSignature">void&nbsp;provideProvisionResponse&#8203;(byte[]&nbsp;response)
                       throws <a href="https://developer.android.com/reference/android/media/DeniedByServerException.html" title="class or interface in android.media" class="externalLink" target="_top">DeniedByServerException</a></pre>
<div class="block">Provides a provisioning response for the last request to be generated using <a href="#getProvisionRequest()"><code>getProvisionRequest()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>response</code> - The response data from the server.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/media/DeniedByServerException.html" title="class or interface in android.media" class="externalLink" target="_top">DeniedByServerException</a></code> - If the response indicates that the server rejected the request.</dd>
</dl>
</li>
</ul>
<a id="queryKeyStatus(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>queryKeyStatus</h4>
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/util/Map.html" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;queryKeyStatus&#8203;(byte[]&nbsp;sessionId)</pre>
<div class="block">Returns the key status for a given session, as {name, value} pairs. Since DRM license policies
 vary by vendor, the returned entries depend on the DRM plugin being used. Refer to your DRM
 provider's documentation for more information.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sessionId</code> - The ID of the session being queried.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The key status for the session.</dd>
</dl>
</li>
</ul>
<a id="acquire()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquire</h4>
<pre class="methodSignature">void&nbsp;acquire()</pre>
<div class="block">Increments the reference count. When the caller no longer needs to use the instance, it must
 call <a href="#release()"><code>release()</code></a> to decrement the reference count.

 <p>A new instance will have an initial reference count of 1, and therefore it is not normally
 necessary for application code to call this method.</div>
</li>
</ul>
<a id="release()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre class="methodSignature">void&nbsp;release()</pre>
<div class="block">Decrements the reference count. If the reference count drops to 0 underlying resources are
 released, and the instance cannot be re-used.</div>
</li>
</ul>
<a id="restoreKeys(byte[],byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restoreKeys</h4>
<pre class="methodSignature">void&nbsp;restoreKeys&#8203;(byte[]&nbsp;sessionId,
                 byte[]&nbsp;keySetId)</pre>
<div class="block">Restores persisted offline keys into a session.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sessionId</code> - The ID of the session into which the keys will be restored.</dd>
<dd><code>keySetId</code> - The <code>keySetId</code> of the keys to restore, as provided by the call to <a href="#provideKeyResponse(byte%5B%5D,byte%5B%5D)"><code>provideKeyResponse(byte[], byte[])</code></a> that persisted them.</dd>
</dl>
</li>
</ul>
<a id="getMetrics()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMetrics</h4>
<pre class="methodSignature">@Nullable
<a href="https://developer.android.com/reference/android/os/PersistableBundle.html" title="class or interface in android.os" class="externalLink" target="_top">PersistableBundle</a>&nbsp;getMetrics()</pre>
<div class="block">Returns metrics data for this ExoMediaDrm instance, or <code>null</code> if metrics are unavailable.</div>
</li>
</ul>
<a id="getPropertyString(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPropertyString</h4>
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getPropertyString&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName)</pre>
<div class="block">Returns the value of a string property. For standard property names, see <a href="https://developer.android.com/reference/android/media/MediaDrm.html#getPropertyString(java.lang.String)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm.getPropertyString(java.lang.String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>propertyName</code> - The property name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property value.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If the underlying DRM plugin does not support the property.</dd>
</dl>
</li>
</ul>
<a id="getPropertyByteArray(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPropertyByteArray</h4>
<pre class="methodSignature">byte[]&nbsp;getPropertyByteArray&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName)</pre>
<div class="block">Returns the value of a byte array property. For standard property names, see <a href="https://developer.android.com/reference/android/media/MediaDrm.html#getPropertyByteArray(java.lang.String)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm.getPropertyByteArray(java.lang.String)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>propertyName</code> - The property name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property value.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If the underlying DRM plugin does not support the property.</dd>
</dl>
</li>
</ul>
<a id="setPropertyString(java.lang.String,java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPropertyString</h4>
<pre class="methodSignature">void&nbsp;setPropertyString&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName,
                       <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;value)</pre>
<div class="block">Sets the value of a string property.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>propertyName</code> - The property name.</dd>
<dd><code>value</code> - The value.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If the underlying DRM plugin does not support the property.</dd>
</dl>
</li>
</ul>
<a id="setPropertyByteArray(java.lang.String,byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPropertyByteArray</h4>
<pre class="methodSignature">void&nbsp;setPropertyByteArray&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;propertyName,
                          byte[]&nbsp;value)</pre>
<div class="block">Sets the value of a byte array property.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>propertyName</code> - The property name.</dd>
<dd><code>value</code> - The value.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If the underlying DRM plugin does not support the property.</dd>
</dl>
</li>
</ul>
<a id="createMediaCrypto(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMediaCrypto</h4>
<pre class="methodSignature"><a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaCrypto</a>&nbsp;createMediaCrypto&#8203;(byte[]&nbsp;sessionId)
                          throws <a href="https://developer.android.com/reference/android/media/MediaCryptoException.html" title="class or interface in android.media" class="externalLink" target="_top">MediaCryptoException</a></pre>
<div class="block">Creates an <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> for a given session.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sessionId</code> - The ID of the session.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> for the given session.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/media/MediaCryptoException.html" title="class or interface in android.media" class="externalLink">MediaCryptoException</a></code> - If an <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm" target="_top"><code>ExoMediaCrypto</code></a> could not be created.</dd>
</dl>
</li>
</ul>
<a id="getExoMediaCryptoType()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getExoMediaCryptoType</h4>
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm" target="_top">ExoMediaCrypto</a>&gt;&nbsp;getExoMediaCryptoType()</pre>
<div class="block">Returns the <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> type created by <a href="#createMediaCrypto(byte%5B%5D)"><code>createMediaCrypto(byte[])</code></a>.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
